<template>
    <div class="user-group">
        <elTable :formData="formData">
                <el-table-column prop="id" label="ID" align="center"></el-table-column>
                <el-table-column prop="name" label="名称" align="center"></el-table-column>
        </elTable>
    </div>
</template>
<script>
import elTable from "@/components/xForm/elTable"
export default {
    name: 'userGroup',
    components: {
        elTable
    },
    data () {
        return {
            formData: {
                currentPage: 1,
                pageSize: 10,
                data: []
            }
        }
    },
    created () {
        this.getList()
    },
    methods: {
        getList () {
            this.$loading(true)
            this.$api.userManage.getUserGroupList().then(r => {
                let list = r.data || []
                this.formData.data = list
            }).finally(() => {
                this.$loading(false)
            })
        }
    }
}
</script>